<script setup lang="ts">
import { Status, statusToString } from '../model'

const props = defineProps<{
    status?: Status
}>()
const statusType = (status?: Status | string) => {
    switch (status) {
        case Status.APPROVED:
            return 'success'
        case Status.REJECTED:
            return 'danger'
        case Status.PENDING:
            return 'primary'
    }
    return ''
}
</script>

<template>
    <el-tag :type="statusType(props.status)" round >{{ statusToString(props.status) }}</el-tag>
</template>

<style scoped>

</style>